{#<!DOCTYPE html>#}
{#<html>#}
{#    <head>#}
{#        <title>Minimal websocket application</title>#}
{#        <script type="text/javascript" src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>#}
{#        <script type="text/javascript">#}
{#        $(function() {#}
{#            // Open up a connection to our server#}
{#            var ws = new WebSocket("ws://localhost:10000/");#}
{##}
{#            // What do we do when we get a message?#}
{#            ws.onmessage = function(evt) {#}
{#                $("#placeholder").append('<p>' + evt.data + '</p>')#}
{#            }#}
{#            // Just update our conn_status field with the connection status#}
{#            ws.onopen = function(evt) {#}
{#                $('#conn_status').html('<b>Connected</b>');#}
{#            }#}
{#            ws.onerror = function(evt) {#}
{#                $('#conn_status').html('<b>Error</b>');#}
{#            }#}
{#            ws.onclose = function(evt) {#}
{#                $('#conn_status').html('<b>Closed</b>');#}
{#            }#}
{#        });#}
{#        </script>#}
{#        <link rel="stylesheet" href="node_modules/xterm/dist/xterm.css" />#}
{#        <script src="/static/xterm.min.js"></script>#}
{##}
{#    </head>#}
{#    <body>#}
{#        <h1>WebSocket Example</h1>#}
{#        <div id="conn_status">Not Connected</div>#}
{#        <div id="placeholder" style="width:600px;height:300px;"></div>#}
{#        <div id="terminal"></div>#}
{#        <script>#}
{#      	    var term = new Terminal();#}
{#            term.open(document.getElementById('terminal'));#}
{#            term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')#}
{#        </script>#}
{##}
{#    </body>#}
{#</html>#}
 <!doctype html>
  <html>
    <head>
      <link rel="stylesheet" href="xterm.css" />
      <script src="xterm.js"></script>
    </head>
    <body>
      <div id="terminal"></div>
      <script>
      	var term = new Terminal();
        term.open(document.getElementById('#terminal'));
        term.write('Hello from \033[1;3;31mxterm.js\033[0m $ ')
      </script>
    </body>
  </html>